1. Field of the Invention
The invention relates to data processing systems, and more particularly to a memory-accessing system which protects memory locations from unauthorized access.
2. Description of the Related Art
Modern computer systems are organized such that all information within the system is represented by hardware-recognized, memory-resident information structures called objects. This is known as an object-oriented computer architecture. An object is a package of data that is a representation of related information maintained in a contiguously-addressed set of memory locations.
In an object-oriented programming system, each type or class of object has a set of operations that are permitted to be performed on the objects that are members of the class. This is known as an object-based access mechanism. The internal structure of objects is hidden from the programmer. The programmer can manipulate the objects only with the permitted operations. Access to an object is by means of a pointer to the object called an access descriptor. An access descriptor describes the kind of representation (rep) rights (such as read rights or write rights) which define the various kinds of access to the object that are permitted by the holder of the access descriptor for that object.
U.S. Pat. No. 4,325,120 granted Apr. 13, 1982, to Colley et al. and assigned to Intel Corporation, discloses an object-based access mechanism in which two basic types of objects are recognized and distinguished by a processor. The first basic type is a data segment which contains ordinary data. The second basic type is an access list which contains access descriptors which are used to access information, that is other objects, in the memory. Each access descriptor provides information for locating and defining the extent of access to an object associated with that access descriptor. Unauthorized access to the memory is controlled by a protection mechanism which checks the access descriptor utilized in the process of generating references to objects in the memory.
In early computer systems, the architecture provided for two program states, the supervisor state and the problem state, with the processor switching between the two states. In the problem state, all privileged instructions (I/O instructions, protection instructions, and a group of control instructions) are invalid. In the supervisor state, all instructions are valid. When a privileged instruction is encountered in the problem state, a privileged-operation exception is recognized, a program interrupt occurs and the operation is suppressed. Protection is provided to protect the contents of certain areas of main memory from destruction or misuse. Locations are protected by identifying blocks of storage with a key and comparing this key against a protection key supplied with the data to be stored. A mismatch will cause an exception to be recognized, a program interrupt occurs and the operation is suppressed.
The architecture of the Colley et al. patent eliminated the need for different execution states within the processor, such as the supervisor state and the problem state. In that object-oriented architecture there was no need for privileged instructions that are executed only when the processor is in the supervisor state. Memory protection was achieved by allowing or prohibiting access to certain objects, rather than certain memory locations.
In an object-oriented architecture, segments are the basis for all addressing and protection. A segment is a single linear address space with a defined size or length. Segments exist in main memory and are associated with a starting or base address. To determine the actual physical address of an item of data within a segment or an object, one adds the position of the item within the segment (called its displacement) to the segment's base address. In systems with segmented addressing, moving a segment requires the updating of its base address. However, the base address information can be distributed throughout memory and in the processor's registers. This means that if a segment is moved, many copies of its base address will have to be located and updated to reflect the change. To obviate this problem, the Colley et al. architecture brings together all of the information about a segment and places that information in a segment table. It then requires that all references to a segment obtain the necessary base address and length information from this table. Any reference to the segment will access the segment descriptor and obtain the correct and current base address and length information. It is an object of the present invention to provide an object addressing mechanism that will accommodate simple to complex addressing structures with access protection at each level of addressing.
It is an object of the present invention to provide an object type management mechanism which will accommodate both system types, specifying predefined properties of an object, and extended types, specifying type-specific software-defined properties of an object.
It is a further object of the invention to provide a mechanism for the amplification or restriction of the rights of access descriptors.